Evolution of leaf and stem armature in palms (Arecaceae). Ancestral state reconstructions were performed using stochastic character mapping. The posterior probability (PP, between 0 and 1) of ancestral lineages possessing armature is indicated with the yellow colour (i.e. more yellow means higher probability of having armature; black colour is intermediate and thus illustrates an equivocal state, grey means low probability of having armature), suggesting that Cretaceous palms probably had stem armature, but possibly not leaf armature (H1, ). The probability of armature at the root node is indicated. Armature evolved at least eight times independently in palms (indicated with the asterisks, simultaneous occurrences of leaf and stem armature are indicated with a double asterisk). Most origins occurred in subfamilies Coryphoideae (e.g. typical spinescent genera Brahea, Coccothrinax, Copernicia, Corypha, Cryosophila, Hyphaene, Licuala, Livistona, Phoenix and Trithrinax) and Arecoideae (e.g. genera Aiphanes, Astrocaryum, Bactris, Butia and Desmoncus) and happened from 40 Ma onwards, when megaherbivorous mammals had evolved. Subfamilies are indicated at the tips of the phylogenetic tree. The grey bar (between stippled lines) reflects the megaherbivore gap (PMHG). For the evolution of stem and leaf armature combined, see electronic supplementary material, figure S4. (Online version in colour.)